import { householdStatusUrl, userInfoUrl } from '../../../../api/individual'
import { get, post } from '../../../../utils/index'

Page({
  data: {
    form: {},
    isHousehold: false
  },
  async loadData () { // 获取户籍状态
    let { data } = await get(householdStatusUrl)
    this.setData({ isHousehold: data })
  },
  async loadUser () { // 获取人员信息
    const { data } = await post(userInfoUrl)
    data.socialSecurityFundOnly = data.companyVO && data.companyVO.socialSecurityFundOnly
    this.setData({ form: data })
  },
  onLoad () {
    this.loadData()
    this.loadUser()
  }
})